/*
 * Document.cpp
 *
 *  Created on: 2011-10-25
 *      Author: Mark
 */

#include "Document.h"

Document::Document(string xml):root(NULL) {
	unsigned int tagStart = xml.find_first_of('<', 0);
	if (tagStart == string::npos) {
		return;
	}
	unsigned int tagEnd = xml.find_first_of('>', tagStart);
	string tag = xml.substr(tagStart + 1, tagEnd - tagStart - 1);

	root = new Element(tag);
}

Element* Document::getDocumentElement() {
	return root;
}
void Document::createElement(string name){
	
}
